#include <winsock2.h>
#include <mysql.h>

#ifndef _Database
#define _Database

#pragma comment (lib, "libmysql.lib")


class Database {
public:
	MYSQL conn;    /* pointer to connection handler */

	// Constructor
	Database(char* /*username*/, char* /*password*/, char* /*db*/, char* /*host*/, int /*port*/);
	// Deconstructor
	~Database(void);

	// query the data base
	int query(char* /*query*/);

	MYSQL_RES* threadsafe_query(HANDLE /*mutex*/, char* /*query*/);
	void safe_mysql_free_result(MYSQL_RES*);
};

#endif // _Database